/**
 * Wmd Prompt Dialog
 * https://github.com/internetarchive/openlibrary/wiki/Design-Pattern-Library#wmdpromptdialog
 * these dialogs can be seen when wmd-button-bar icon is clicked e.g. add link
 */

// These !important's are a necessary evil.
// They compensate for the fact that jquery.wmd.js was not written for mobile.
// The library must be forked to be mobile friendly
// as that library is no longer maintained.
// Until then.. hacks!
@media all and (max-width: @width-breakpoint-tablet) {
  .wmd-prompt-dialog {
    margin-left: 10px !important;
    margin-top: 10px !important;
    top: 100px !important;
    left: 0 !important;
    right: 0 !important;
    width: 300px !important;
  }
}

.wmd-prompt-dialog {
  width: 400px;
  border: 10px solid @brown;
  background-color: @white;
  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  border-radius: 12px;
  -moz-box-shadow: 1px 3px 10px @black;
  -webkit-box-shadow: 1px 3px 10px @black;
  box-shadow: 1px 3px 10px @black;
  text-align: left;

  >  div {
    font-size: 14px;
    font-family: @lucida_sans_serif-2;
    color: @darker-grey;
    padding: 20px !important;
    p {
      margin-bottom: 0 !important;
      position: relative;
    }
  }
  > form {
    width: 480px;
    padding: 20px;
    padding-top: 0;
    > input[type=text] {
      float: left;
      margin-left: 20px !important;
      clear: both;
      width: 350px;
      font-size: 1.125em;
      font-family: @lucida_sans_serif-1;
      padding: 3px;
    }
    > input[type="button"] {
      font-size: 1.125em;
      width: auto !important;
    }
  }
  p b {
    display: block;
    position: relative;
    background-color: @brown;
    padding: 0 10px 10px;
    color: @white;
    font-family: @news_gothic_sans_serif;
    font-size: 1.75em;
    top: -20px;
    left: -21px;
    width: 282px;
  }
}

@media all and ( min-width: @width-breakpoint-tablet ) {
  .wmd-prompt-dialog {
    p b {
      width: 380px;
    }
  }
}
